<template>
  <div id="app"
       :class="them">
    <router-view />
    <Footer v-if="showFooter"></Footer>
  </div>
</template>

<style lang="scss">
@import "./scss/_mixin.scss";

a {
  text-decoration: none;
}
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
}

ul {
  list-style: none;
}

input,
button {
  border: none;
  outline: none;
}

body {
  background-color: #ebebeb;
  -webkit-font-smoothing: antialiased;
}

:root {
  --them-color: #30c27c;
}

.container {
  box-sizing: border-box;
  width: 100%;
  padding-left: 0.24rem;
  padding-right: 0.24rem;
  @include clearfix;
}

@media (max-width: 768px) {
  html {
    font-size: 13.33333333vw;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 50px;
  }
}

@media (min-width: 900px) {
  body {
    margin: 0 auto;
    max-width: 750px;
  }
}
</style>

<script>  
import Footer from './components/Footer'
export default {
  components: {
    Footer
  },
  data () {
    return {
      them: 'blue-them',
      showFooter: false,
      isWx: navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger",
    }
  },
  methods: {
    setPageTitle () {
      // const clientType = getUrlParam('ctype');
      // const orgid = getUrlParam('orgid');

      const { orgid, ctype } = this.$route.query

      if (ctype == 6 || orgid == 101) {
        document.title = "巧读";
        this.them = 'blue-them'
      }
      else if (!orgid || orgid == 0) {
        document.title = "read1000·千读";
        this.showFooter = true
        this.them = 'green-them'
      }
    }
  },
  created () {
    this.setPageTitle();
  },
}
</script>
